﻿namespace Core.RabbitMQ
{
    public class ConsumerOptions
    {
        /// <summary>
        /// 交换机类型
        /// </summary>
        public ExchangeTypeEnum ExchangeType { get; set; } = ExchangeTypeEnum.Topic;

        /// <summary>
        /// 交换机名称
        /// </summary>
        public string? Exchange { get; set; }

        /// <summary>
        /// 路由键
        /// </summary>
        public string? RoutingKey { get; set; }

        /// <summary>
        /// 队列名称
        /// </summary>
        public string QueueName { get; set; } = null!;

        /// <summary>
        /// 消费者预取计数
        /// </summary>
        public ushort PrefetchCount { get; set; } = 1;

        /// <summary>
        /// 队列过期时间
        /// </summary>
        public int QueueTtl { get; set; } = 3600000;

        
        /// <summary>
        /// 重新创建连接延迟毫秒数
        /// </summary>
        public int RetryCreateDelayMilliseconds { get; set; } = 10000;

        /// <summary>
        /// 允许最大请求重试次数
        /// </summary>
        public int MaxRequestRetryCount { get; set; } = 3;
    }
}
